TOMATO ADVENTURE TRANSLATION DEV STUFF
By Mato, Dec. 4, 2010
http://matotree.com

After finishing Mother 3 a few years ago, I was still interested in hacking/translating old neglected GBA games. Tomato Adventure fit the bill perfectly, so I jumped in and started pulling the game apart. I managed to get a lot of the technical stuff out of the way, but I quickly realized the game was going to be a ton more work than I had time for. So I'm releasing these notes and dev files for anyone who's interested in starting their own translation of the game.

It's been years since I worked on this stuff, so I don't remember much anymore. I can't really provide any help or additional translation/hacking help with it either, I have even less time than I did back then :(

In any case, here's what I did with this project:

- I started by figuring out the script text format and creating a character table.
- I also figured out how the menu text worked
- After a lot of brute-force work and a lot of starting over from scratch, I dumped the majority of the text in the game into text files
- I created a format for these text files that help translated text get reinserted properly
- Created a simple program to reinsert this stuff
- Did some VERY quick translations of just some stuff to see if everything was working
- Probably more, but I forget now

There's an IPS patch among all these files. It's the latest build of the project, but as I mentioned, it was really just to see if things were working properly and not really meant to be played at all. It's there if you want to try it out, though.

There are two big problems with this game:

 1. The script is really big - much bigger than I anticipated and is a big reason why I had to drop the project. I don't have as much free time as I
    used to anymore, so maybe someone with more time and energy can pick it up.
    
 2. The script text is stored using pointers embedded within text/action lines itself. If you're not familiar with ROM hacking, this is basically a huge
    pain and means it's extremely tough to dump all the text. To get around this, I basically brute-forced it by scanning everything in the text areas
    of the ROM looking for anything that looked like a pointer, then doing some basic checks to try to weed out false positives. In the end, I think I
    probably got 70-90% of all the text in the game, there might be some other stuff hidden because I didn't get far enough into the game to realize
    there's even more text to be dumped. In any case, this hard work has been done, but if you want to see how stuff works you can check one of the
    C files I've included.
    
Anyway, it's still really rough and unpolished, but for the most part it should be possible to translate most of the game with this stuff. The main files to edit are:

 - ta_misc_eng.txt
 - ta_menus_eng.txt
 - ta_script_eng.txt
 
NOTE! There are other English text files in here too, just ignore them. They're from earlier attempts to hack the game. I'm leaving them here simply for reference. The enemies and items files aren't used anymore, for example - that stuff's included in the menus file now.

If you want to add translated text to one of these files, open up the Japanese version of the file too. Go to the line you want to translate, then write the English translation in the corresponding line in the English file. So to translate line 285 in the Japanese file, you'd go to line 285-E in the English file and write it all in there, with all the proper formatting and control codes, of course.

To rebuild the translation, you need to put a Tomato Adventure ROM in a folder with all these other files, then run the "i.bat" file. This will copy the ROM and do some other prepping stuff. Then you need to run the "a.exe" program, which is just the compiled version of ta_insert.c. This will insert the text files into the game. Now run the "test.gba" file in your emulator and you should see your changes if all went well.

The C files I've included aren't actually pure C, so you'll probably need to compile them with a C++ compiler. I use command line g++, but pretty much any C++ compiler should do the trick, since the code is very simple, basic stuff.

It goes without saying that these files and tools are probably buggy and/or incomplete. I'm only releasing these tools and notes to help other people - I wouldn't recommend using these tools to attempt a full translation. Think of these more of as a stepping stone, so that other people don't have to repeat the work I did.

Here's quick, general list of what needs to be done to make a full translation:

 - translate the script file
 - insert a better-looking font, or at least better-looking punctuation
 - translate the menu file
 - translate misc stuff like the naming screen
 - translate special, non-standard text, like the intro part between the first naming screen and the king's announcement scene
   I can't remember if this is stored as graphical text or if it's a different text format stored in a completely different area.
 - translate the multiplayer game thing, as I recall it's a card game but it's been so long that I might be thinking of another game
 - new title screen
 - and probably a lot more!

I figured that since this was an early-ish GBA game that it'd be simple, but it's actually a lot more work than I thought. If you're up to the task, hopefully all this stuff will help you out!
